module.exports = (sequelize, DataTypes) => {
  return sequelize.define(
      "user",
      {
        // 在这里定义模型属性
        id: {
          type: DataTypes.INTEGER, //模型字段类型
          primaryKey: true, //主键
          autoIncrement: true, //自增长
        },
        name: {
          type: DataTypes.STRING,
          allowNull: false,
        },
        account: {
          type: DataTypes.STRING,
          allowNull: false,
        },
        password: {
          type: DataTypes.STRING,
          allowNull: false,
        },
        role: {
          type: DataTypes.STRING,
          allowNull: false,
        },
        is_action: {
          type: DataTypes.STRING,
          allowNull: false,
        },
        src: {
          type: DataTypes.STRING,
          allowNull: true,
        },
        message: {
          type: DataTypes.BLOB,
          allowNull: true,
        },
      },
      {
        tableName: "user",
        timestamps: true,
      }
    );
};
